<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp"%>
<!-- 分页显示演示开始 -->
<form id="listForm" class="well form-search" action="${ctx}/adoms/marchandise/myList" method="post">
	<input type="hidden" name="pageNo" id="pageNo" value="${pageData.pagination.pageNo}" />
	<input type="hidden" name="fieldName" id="fieldName" value="${pageData.compositor.fieldName}" />
	<input type="hidden" name="compositorType" id="compositorType" value="${pageData.compositor.compositorType}" />
	<table class="table table-striped table-bordered table-condensed">
		<tr align="center">
			<th>
				商品名称|商品编码
				<y:search fieldType="S" fieldList="name,code" matchType="LIKE" className="input-medium search-query" />
				<button class="btn btn-small" onclick="search()" type="button">
					<i class="icon-search"></i>
					搜索
				</button>
			</th>
		</tr>
	</table>
</form>
<table class="table table-striped table-bordered table-condensed">
	<thead>
		<tr>
			<th>#</th>
			<th>
				<a href="javascript:sort('name')">商品名称</a>
			</th>
			<th>
				<a href="javascript:sort('code')">商品编码</a>
			</th>
			<th>
				<a href="javascript:sort('packageing')">包装</a>
			</th>
			<th>
				<a href="javascript:sort('price')">单价</a>
			</th>
			<th align="center">
				<a href="javascript:sort('shelflife')">保质期(月)</a>
			</th>
			<th>
				<a href="javascript:sort('spcification')">规格</a>
			</th>
			<th>
				<a href="javascript:sort('numOfBox')">每件数量</a>
			</th>
			<th>
				<a href="javascript:sort('type.name')">商品类型</a>
			</th>
			<th>
				<a href="javascript:sort('dan')">段位</a>
			</th>
			<th>
				<a href="javascript:sort('weight')">净重(g)</a>
			</th>
			<th>
				<a href="javascript:sort('producePlace')">产地</a>
			</th>
			<th>
				<a href="javascript:sort('brand.name')">品牌</a>
			</th>
			<th>
				<a href="javascript:sort('barCode')">条形码</a>
			</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="entity" items="${pageData.result}" varStatus="index">
			<tr <c:if test="${!entity.visible}">bgcolor="#AFEEEE"</c:if>>
				<td>${index.index + 1}</td>
				<td>${entity.name}</td>
				<td>${entity.code}</td>
				<td>${entity.packageing}</td>
				<td>${entity.price}</td>
				<td align="center">${entity.shelflife}</td>
				<td>${entity.spcification}</td>
				<td align="center">${entity.numOfBox}</td>
				<td>${entity.type.name}</td>
				<td>${entity.dan}</td>
				<td>${entity.weight}</td>
				<td>${entity.producePlace}</td>
				<td>${entity.brand.name}</td>
				<td>${entity.barCode}</td>
			</tr>
		</c:forEach>
	</tbody>
</table>
<%@ include file="/WEB-INF/jsp/commons/pager.jsp"%>